
def parsepairs(options, args)

	variable_list = yield
	parent = caller[0][/`([^']*)'/, 1]
	args.each { |var, val|
		if options.include? var
			variable_list[var] = val
		else
			raise "Unrecognized parameter name \"#{var}\" passed from \"#{parent}\""
		end
	}
	
	return variable_list
	
end

